package com.example.flower_shop.service;

import com.example.flower_shop.dto.order.CreateOrderRequest;
import com.example.flower_shop.entity.CustomerOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface OrderService {
    // 客户订单相关方法
    Page<CustomerOrder> getCustomerOrders(Long userId, Pageable pageable);

    Page<CustomerOrder> getCustomerOrdersByStatus(Integer status, Pageable pageable);

    Page<CustomerOrder> getUserOrdersByStatus(Long userId, Integer status, Pageable pageable);

    CustomerOrder getCustomerOrderByOrderNo(String orderNo);

    CustomerOrder createCustomerOrder(Long userId, CreateOrderRequest request);

    CustomerOrder payCustomerOrder(String orderNo);

    CustomerOrder cancelCustomerOrder(String orderNo);

    CustomerOrder confirmCustomerOrder(String orderNo);

    // 商家订单相关方法
    Page<CustomerOrder> getMerchantOrders(Long merchantId, Pageable pageable);

    Page<CustomerOrder> getMerchantOrdersByStatus(Long merchantId, Integer status, Pageable pageable);

    CustomerOrder getMerchantOrderByOrderNo(String orderNo);

    CustomerOrder updateMerchantOrderStatus(String orderNo, Integer status, String processingNotes);

    void deleteMerchantOrder(String orderNo, Long merchantId);

    void deleteCustomerOrder(String orderNo, Long userId);

    // 统计相关方法
    long count();
}